#!/usr/bin/bash
DIR_SOURCEVERSION=/home/dig/graph_data/image_data
cd $DIR_SOURCEVERSION
RES=""
#mongo导出周期(秒)1D + 1H
SYNC_PERIOD=90000

DIR=(`find . -name 'data_parsed_20*' -type d | sort`)
start=''
LEN=${#DIR[@]}
for((i=0;i<$LEN;i++));
do
    d=${DIR[$i]}
    if [[ -f $d/lz ]];then
        continue
    fi
    start=`cat $d/source_version|sort|head -1`
    break
done
start=`cat data_parsed_20*/source_version|sort|head -1`
if [ "$start" == "" ];then
    exit 0
fi
echo "\"${start}\""
